<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>{:isset($info['id'])?'编辑':'新增'}前台权限节点</h2>
    </div>
    <form action="__SELF__" method="post" class="form-horizontal">

        <div class="form-item">
            <label class="item-label">标题<span class="check-tips">（用于后台显示的配置标题）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="title" value="{$info.title|default=''}">

            </div>
        </div>
        
                <div class="form-item">
            <label class="item-label">节点标识<span class="check-tips" >（用于代码中区分权限节点[调用函数&quot;check_auth('节点标识')&quot;进行权限验证]，<span style="color: red">认证规则唯一标识</span>）</span></label>
            <div class="controls">
              <input type="text" class="text input-large" name="name" value="{$info.name|default=''}" />
            </div>
      </div>
        
        <div class="form-item">
          <label class="item-label">附加条件<span class="check-tips" >用于验证的附加条件。格式：{会员表字段}+比较符+期望值；多条件可用 and 或 or 进行连接, 如：{score}>10 and {login}>20 </span></label>
          <div class="controls">
            <label class="textarea input-large">
			  <textarea name="condition">{$info.condition|default=''}</textarea>
		</label>	
          </div>
      </div>

        <div class="form-item">
            <label class="item-label">所属模块<span class="check-tips">权限节点所属的模块</span></label>
            <div class="controls">
                <select name="module">
                    <volist name="Modules" id="module">
                        <neq name="module.is_setup" value="0">
                        <option value="{$module.name}" <eq name="module.name" value="$info['module']">selected</eq>>{$module.alias}</option>
                        </neq>
                    </volist>
                </select>
            </div>
        </div>



        <div class="form-item">
            <input type="hidden" name="id" value="{$info.id|default=''}">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('index')}');
    </script>
</block>